home *** CD-ROM | disk | FTP | other *** search
/ Aminet 49 / Aminet 49 (2002)(GTI - Schatztruhe)[!][Jun 2002].iso / Aminet / util / boot / WBSP_Prefs.lha / WBStartup+Prefs / Source / GetPriorityWindow.c < prev    next >
C/C++ Source or Header  |  2002-03-05  |  1KB  |  35 lines

  1. #include <exec/types.h>
  2. #include <libraries/mui.h>
  3.  
  4. #include <string.h>
  5. #include <proto/dos.h>
  6. #include <proto/exec.h>
  7. #include <proto/intuition.h>
  8. #include <proto/muimaster.h>
  9.  
  10. #include "WBStartup+Prefs.h"
  11. #include "WBStartupPlusPrefs_Cat.h"
  12.  
  13. void GetPriority(int pri)
  14. {
  15.   pwinobj=MUI_NewObject("Window.mui",MUIA_Window_Title,GetString(STRPriority),
  16.                      MUIA_Window_LeftEdge,MUIV_Window_LeftEdge_Moused,
  17.                      MUIA_Window_TopEdge,MUIV_Window_TopEdge_Moused,
  18.                      MUIA_Window_RootObject,
  19.     MUI_NewObject("Group.mui",MUIA_Group_Child,
  20.         sliderobj=MUI_NewObject("Slider.mui",MUIA_Slider_Level,(LONG)pri,
  21.                                     MUIA_Slider_Min,-128,
  22.                              MUIA_Slider_Max,127,
  23.                              MUIA_Frame,MUIV_Frame_Slider,
  24.         TAG_DONE),
  25.     TAG_DONE),
  26.   TAG_DONE);
  27.   if (pwinobj)
  28.   {
  29.           SetAttrs(winobj,MUIA_Window_Sleep,TRUE,TAG_DONE);
  30.       DoMethod(appobj,OM_ADDMEMBER,pwinobj);
  31.       DoMethod(pwinobj,MUIM_Notify,MUIA_Window_CloseRequest,TRUE,appobj,2,MUIM_Application_ReturnID,4);
  32.       SetAttrs(pwinobj,MUIA_Window_Open,TRUE,TAG_DONE);
  33.   }
  34. }
  35.